Repository navigation
refactor(nodes): unify vector stores on a shared StoreBase - #1663
Conversation
…e_qdrant Turn ai.common.store into a package paralleling ai.common.graph and ai.common.database, and add StoreGlobalBase/StoreInstanceBase so a vector-store node is a thin driver instead of re-implementing the lifecycle and lanes. - StoreGlobalBase(IGlobalTransform, ABC): the beginGlobal skeleton (CONFIG guard, serverName, embedder wiring, super().beginGlobal), endGlobal, validateConfig. Drivers implement _open_store / _sub_key / _probe_connection. - StoreInstanceBase(VectorStoreToolMixin, IInstanceTransform, ABC): the three byte-identical lane handlers (writeQuestions/writeDocuments/renderObject). Inheriting the mixin gives every node the search/upsert/delete agent tools uniformly — today only 3 of 9 nodes expose them. - store.py -> store/document_store.py; store/__init__.py re-exports the public surface so `from ai.common.store import ...` keeps working. - Migrate store_qdrant as the pilot: IGlobal 224->153, IInstance 78->32 lines, behavior unchanged. The other 8 drivers migrate in follow-ups.
Collapse each IInstance to StoreInstanceBase (shared lane handlers + tool mixin) and each IGlobal to StoreGlobalBase with three driver hooks: _open_store, _sub_key, _probe_connection. Per-driver specifics stay in the driver: collection-name regexes, SDK probes and _format_error helpers, and the astra/atlas subKey shapes. Data-lane-only drivers (milvus/postgres/ weaviate/astra/atlas) now expose the search/upsert/delete agent tools and a tool-path embedder uniformly, and drop their duplicated lifecycle. Pinecone no longer imports its Store at module load (config mode stays driver-free). Elasticsearch (dual-backend, no shared Store) is deferred to a dedicated PR.
🤖 Internal: Discord sync markerAuto-managed by the Discord notification workflow. Stores the linked Discord message ID and forum thread ID. Do not edit or delete. |
📝 WalkthroughWalkthroughVector store nodes now use shared ChangesVector store lifecycle consolidation
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant IGlobal
participant StoreGlobalBase
participant ProviderStore
participant IGlobalTransform
IGlobal->>StoreGlobalBase: beginGlobal()
StoreGlobalBase->>IGlobal: _open_store(...)
IGlobal->>ProviderStore: construct provider store
StoreGlobalBase->>IGlobal: _sub_key()
StoreGlobalBase->>IGlobalTransform: beginGlobal(subKey)
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR refactors the vector-store node implementation by extracting shared IGlobal/IInstance behavior into reusable base classes under ai.common.store, and migrates multiple store_* drivers to thin subclasses that only provide provider-specific hooks.
Changes:
- Added
StoreGlobalBaseandStoreInstanceBaseto centralize lifecycle, transform-key registration, and common pipeline lane handlers across vector-store nodes. - Migrated
store_{qdrant,weaviate,postgres,pinecone,milvus,chroma,astra,atlas}nodes to inherit the shared bases and implement only driver hooks (_open_store,_sub_key,_probe_connection). - Converted
ai.common.storefrom a module into a package with re-exports, and updated the vectordb tool-mixin test harness to importdocument_store.pydirectly.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ai/src/ai/common/store/store_instance_base.py | New shared IInstance base implementing common lane handlers and tool mixin inheritance. |
| packages/ai/src/ai/common/store/store_global_base.py | New shared IGlobal base implementing common lifecycle, optional tool-path embedder wiring, and save-time validation dispatch. |
| packages/ai/src/ai/common/store/document_store.py | Adjusted schema imports to reflect store now being a package (relative import updated). |
| packages/ai/src/ai/common/store/init.py | New package surface re-exporting the public store API to keep imports stable. |
| nodes/test/test_vectordb_tool_mixin.py | Updated isolated import/stubbing to load ai.common.store.document_store from the new package layout. |
| nodes/src/nodes/store_weaviate/IInstance.py | Migrated to StoreInstanceBase. |
| nodes/src/nodes/store_weaviate/IGlobal.py | Migrated to StoreGlobalBase with provider hooks. |
| nodes/src/nodes/store_qdrant/IInstance.py | Migrated to StoreInstanceBase. |
| nodes/src/nodes/store_qdrant/IGlobal.py | Migrated to StoreGlobalBase with provider hooks. |
| nodes/src/nodes/store_postgres/IInstance.py | Migrated to StoreInstanceBase. |
| nodes/src/nodes/store_postgres/IGlobal.py | Migrated to StoreGlobalBase with provider hooks. |
| nodes/src/nodes/store_pinecone/IInstance.py | Migrated to StoreInstanceBase. |
| nodes/src/nodes/store_pinecone/IGlobal.py | Migrated to StoreGlobalBase with provider hooks. |
| nodes/src/nodes/store_milvus/IInstance.py | Migrated to StoreInstanceBase. |
| nodes/src/nodes/store_milvus/IGlobal.py | Migrated to StoreGlobalBase with provider hooks. |
| nodes/src/nodes/store_chroma/IInstance.py | Migrated to StoreInstanceBase. |
| nodes/src/nodes/store_chroma/IGlobal.py | Migrated to StoreGlobalBase with provider hooks (no save-time probe). |
| nodes/src/nodes/store_atlas/IInstance.py | Migrated to StoreInstanceBase. |
| nodes/src/nodes/store_atlas/IGlobal.py | Migrated to StoreGlobalBase with provider hooks. |
| nodes/src/nodes/store_astra/IInstance.py | Migrated to StoreInstanceBase. |
| nodes/src/nodes/store_astra/IGlobal.py | Migrated to StoreGlobalBase with provider hooks. |
Comments suppressed due to low confidence (1)
packages/ai/src/ai/common/store/store_instance_base.py:65
writeDocuments()callsself.IGlobal.store.addChunks(...)without checking whetherself.IGlobal.storeis set. SincerenderObject()already raises a clear exception when the store is missing, add the same guard here to prevent a less-informativeAttributeError.
def writeDocuments(self, documents: List[Doc]) -> None:
"""Take a list of documents and add them to the vector store.
Any chunks in the database that have the same object id will be removed.
"""
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
nodes/src/nodes/store_atlas/IGlobal.py (1)
74-77: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winWarning example contradicts the validation regex.
The regex requires embedded credentials (
user:pass@) and a trailing/?…, but the suggested examplemongodb+srv://cluster.example.mongodb.nethas neither, so a user who copies it will still fail validation. Align the example with what the pattern accepts.💡 Suggested wording fix
- warning("Host must be a valid MongoDB URI (e.g., 'mongodb+srv://cluster.example.mongodb.net')") + warning( + "Host must be a valid MongoDB SRV URI " + "(e.g., 'mongodb+srv://user:pass@cluster.abc12.mongodb.net/?retryWrites=true')" + )🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@nodes/src/nodes/store_atlas/IGlobal.py` around lines 74 - 77, Update the warning message in the host validation branch of IGlobal.py to show a MongoDB SRV URI containing credentials and the trailing query delimiter required by mongodb_uri_pattern, while preserving the existing validation logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@nodes/src/nodes/store_pinecone/IGlobal.py`:
- Around line 47-48: Update IGlobal._sub_key to build the transform key from
Pinecone-specific node configuration, including the API key and
collection/profile metadata that distinguish stores, instead of self.store.host
and self.store.port. Preserve deterministic formatting so identical Pinecone
configurations share a key while different accounts or environments with the
same collection do not.
---
Outside diff comments:
In `@nodes/src/nodes/store_atlas/IGlobal.py`:
- Around line 74-77: Update the warning message in the host validation branch of
IGlobal.py to show a MongoDB SRV URI containing credentials and the trailing
query delimiter required by mongodb_uri_pattern, while preserving the existing
validation logic.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 722c9028-63ad-43e6-8a06-4021cd01d7bf
📒 Files selected for processing (21)
nodes/src/nodes/store_astra/IGlobal.pynodes/src/nodes/store_astra/IInstance.pynodes/src/nodes/store_atlas/IGlobal.pynodes/src/nodes/store_atlas/IInstance.pynodes/src/nodes/store_chroma/IGlobal.pynodes/src/nodes/store_chroma/IInstance.pynodes/src/nodes/store_milvus/IGlobal.pynodes/src/nodes/store_milvus/IInstance.pynodes/src/nodes/store_pinecone/IGlobal.pynodes/src/nodes/store_pinecone/IInstance.pynodes/src/nodes/store_postgres/IGlobal.pynodes/src/nodes/store_postgres/IInstance.pynodes/src/nodes/store_qdrant/IGlobal.pynodes/src/nodes/store_qdrant/IInstance.pynodes/src/nodes/store_weaviate/IGlobal.pynodes/src/nodes/store_weaviate/IInstance.pynodes/test/test_vectordb_tool_mixin.pypackages/ai/src/ai/common/store/__init__.pypackages/ai/src/ai/common/store/document_store.pypackages/ai/src/ai/common/store/store_global_base.pypackages/ai/src/ai/common/store/store_instance_base.py
…on teardown Address review feedback on the store base: writeQuestions/writeDocuments now raise the same explicit error as renderObject when the store is absent (restores the guard postgres/astra/atlas carried before the migration), and endGlobal calls super() so IGlobalTransform clears TRANFORM_KEY_TAG_NAME instead of leaving it set after teardown. Also refresh stale references to the pre-package store.py path in the tool-mixin test.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
nodes/test/test_vectordb_tool_mixin.py:10
- Docstring still says the tests load
store.py, but this test now loadsstore/document_store.py(see_STORE_PY). Updating the wording avoids confusion when someone is trying to understand what is being imported/stubbed.
"""Unit tests for the VectorStoreToolMixin (packages/ai/src/ai/common/store/document_store.py).
These tests load ``store.py`` in isolation by stubbing its heavy imports
(``rocketlib``, ``ai.common.schema``) so the module can be exercised without
the server runtime. They cover:
asclearuc
left a comment
There was a problem hiding this comment.
Thanks @dsapandora for putting the store family through the same base-class treatment as graph_* and db_* — collapsing eight near-identical beginGlobal implementations and three copy-pasted lane handlers into one place is clearly the right direction, and the _open_store / _sub_key / _probe_connection split mirrors GraphGlobalBase closely enough that it will read as familiar.
I'm requesting changes on two blocking points: the "uniform agent tools" claim does not hold for store_astra, store_atlas, store_milvus, store_postgres and store_weaviate — their services.json never opts into tool discovery — and 274 lines of new lifecycle code land with no test that exercises them.
Details are in the inline comments. CodeRabbit's store_atlas MongoDB-URI example fix is worth folding in as well; deferring its Pinecone _sub_key note to #1664 looks right to me.
These five stores inherited VectorStoreToolMixin in the base migration but their services.json never opted into tool discovery, so the search/upsert/ delete tools were unreachable. Add 'tool' to classType and 'invoke' to capabilities, and give each a serverName field (plus profile defaults) so two nodes of the same kind in one pipeline get distinct tool namespaces instead of both answering to e.g. milvus.search. READMEs gain the Agent tools section; the generated Schema block regenerates on develop.
Pin the six behaviors a regression in the shared base could silently break across all eight store nodes: CONFIG mode short-circuits before the driver loads, serverName resolves from merged config (default survives blank/non- string), the tool-path embedder stays unset without an embedding block and warns instead of raising, the transform key format, endGlobal clearing state plus the transform key, and the lane guards raising on a missing store. The last two are the review-driven fixes from eecfb6d, now regression-tested.
Give the driver hooks (_open_store/_sub_key/_probe_connection) one-line docstrings matching the graph family, so the base's three-hook public surface is documented per driver. Also: drop private _normalize_vectordb_tool_input from the store package __all__ (it stays reachable via document_store), note why the base passes raw connConfig to _open_store rather than the merged cfg, and fix the atlas save-time warning to show a MongoDB SRV URI that actually matches the validation regex (credentials + trailing query).
|
Thanks for the thorough pass, @asclearuc — both blocking points and the nits are addressed. Pushed as three commits:
Per-comment replies are in the threads. One follow-up offered rather than done here: making the tool-path embedder lazy (build on first tool call instead of |
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
nodes/src/nodes/store_weaviate/IGlobal.py (1)
87-105: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winSelect the probe path from the configured mode.
Store.__init__uses the configuredmodeto choose cloud versus local, but this probe classifies every non-local hostname as cloud. A remote self-hosted deployment configured as local will incorrectly call/v1/metainstead ofconnect_to_local, causing valid configurations to fail or authenticate incorrectly. Use the configured mode for this branch.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@nodes/src/nodes/store_weaviate/IGlobal.py` around lines 87 - 105, Update the probe logic in Store.__init__ to select the cloud versus local path from the configured mode rather than inferring it from the hostname. Ensure local mode invokes connect_to_local even for remote self-hosted hosts, while cloud mode retains the existing /v1/meta request and API-key handling.nodes/src/nodes/store_milvus/IGlobal.py (1)
77-96: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winDisconnect the validation alias in a
finallyblock.After
get_server_version()returns, thevalidatealias remains connected. Repeated save-time probes can retain stale connections and leak client resources. Always disconnect the alias after the probe, including failure paths.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@nodes/src/nodes/store_milvus/IGlobal.py` around lines 77 - 96, Update the validation connection flow in IGlobal.py to wrap the connect and utility.get_server_version probe for alias “validate” in a finally block that always calls connections.disconnect(alias), preserving the existing success and error handling while cleaning up the alias on both successful and failed probes.nodes/src/nodes/store_pinecone/IGlobal.py (1)
101-110: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winRead Pinecone index results using the SDK’s typed index models.
This node pins no Pinecone version, and modern
pineconeversions exposelist_indexes()as model-backed results: an existing collection’s entry supportsindex.name/ bracket access, but calling.get(...)in the loop raisesAttributeErrorand aborts config validation. Use the SDK’s typed attributes/models consistently, or only rely on the.namesconvenience helper if that detail is enough for the existing-index check.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@nodes/src/nodes/store_pinecone/IGlobal.py` around lines 101 - 110, Update the existing-index check in the Pinecone initialization flow around client.list_indexes() and existing_collection to use the SDK’s typed index model attributes instead of dict-only get calls. Access the index name and specification through the supported typed model interface, preserving the existing serverless-dense compatibility validation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@nodes/src/nodes/store_astra/IGlobal.py`:
- Around line 57-59: Replace the no-op implementation of _probe_connection in
IGlobal with save-time collection-name validation using the same format rule
enforced by astra_db.Store.__init__. Ensure validateConfig rejects invalid
collection names even in CONFIG mode, while preserving the existing successful
no-op behavior for valid names.
In `@nodes/src/nodes/store_astra/README.md`:
- Line 91: Update the embedding-provider documentation in
nodes/src/nodes/store_astra/README.md at lines 91-91 and
nodes/src/nodes/store_atlas/README.md at lines 66-66: state that search falls
back to keyword search when no provider is configured, while automatic upsert
embedding still fails without one. Preserve the existing control-plane and
parameter context.
In `@nodes/src/nodes/store_astra/services.json`:
- Around line 172-178: Regenerate the documentation schemas with
nodes:docs-generate instead of editing generated content manually. Apply this to
nodes/src/nodes/store_astra/services.json:172-178 so store_astra/README.md
includes astra_db.serverName, and
nodes/src/nodes/store_atlas/services.json:101-107 so store_atlas/README.md
includes atlas.serverName.
In `@nodes/src/nodes/store_atlas/IGlobal.py`:
- Around line 75-80: Update the mongodb_uri_pattern validation in the
host-checking logic to accept valid MongoDB SRV URIs with no path, with a path
such as /admin, with a trailing slash, and with optional query parameters.
Preserve validation of the required scheme, credentials, host, and .mongodb.net
domain, and keep the existing warning behavior for invalid values.
In `@packages/ai/tests/ai/common/store/test_store_base.py`:
- Around line 240-249: Update test_lane_handlers_delegate_to_store_when_present
to also exercise the shared render handler: create a vectorized object, stub
inst.sendText and preventDefault as needed, call inst.renderObject(), and assert
the store call kinds include the expected third render delegation alongside
search and add.
---
Outside diff comments:
In `@nodes/src/nodes/store_milvus/IGlobal.py`:
- Around line 77-96: Update the validation connection flow in IGlobal.py to wrap
the connect and utility.get_server_version probe for alias “validate” in a
finally block that always calls connections.disconnect(alias), preserving the
existing success and error handling while cleaning up the alias on both
successful and failed probes.
In `@nodes/src/nodes/store_pinecone/IGlobal.py`:
- Around line 101-110: Update the existing-index check in the Pinecone
initialization flow around client.list_indexes() and existing_collection to use
the SDK’s typed index model attributes instead of dict-only get calls. Access
the index name and specification through the supported typed model interface,
preserving the existing serverless-dense compatibility validation.
In `@nodes/src/nodes/store_weaviate/IGlobal.py`:
- Around line 87-105: Update the probe logic in Store.__init__ to select the
cloud versus local path from the configured mode rather than inferring it from
the hostname. Ensure local mode invokes connect_to_local even for remote
self-hosted hosts, while cloud mode retains the existing /v1/meta request and
API-key handling.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 4ae93e7a-ee23-4e36-9475-12a46841a8b6
📒 Files selected for processing (22)
nodes/src/nodes/store_astra/IGlobal.pynodes/src/nodes/store_astra/README.mdnodes/src/nodes/store_astra/services.jsonnodes/src/nodes/store_atlas/IGlobal.pynodes/src/nodes/store_atlas/README.mdnodes/src/nodes/store_atlas/services.jsonnodes/src/nodes/store_chroma/IGlobal.pynodes/src/nodes/store_milvus/IGlobal.pynodes/src/nodes/store_milvus/README.mdnodes/src/nodes/store_milvus/services.jsonnodes/src/nodes/store_pinecone/IGlobal.pynodes/src/nodes/store_postgres/IGlobal.pynodes/src/nodes/store_postgres/README.mdnodes/src/nodes/store_postgres/services.jsonnodes/src/nodes/store_qdrant/IGlobal.pynodes/src/nodes/store_weaviate/IGlobal.pynodes/src/nodes/store_weaviate/README.mdnodes/src/nodes/store_weaviate/services.jsonpackages/ai/src/ai/common/store/__init__.pypackages/ai/src/ai/common/store/store_global_base.pypackages/ai/tests/ai/common/store/__init__.pypackages/ai/tests/ai/common/store/test_store_base.py
💤 Files with no reviewable changes (1)
- packages/ai/src/ai/common/store/init.py
…e-org#1663) * refactor(ai): extract StoreGlobalBase/StoreInstanceBase; migrate store_qdrant Turn ai.common.store into a package paralleling ai.common.graph and ai.common.database, and add StoreGlobalBase/StoreInstanceBase so a vector-store node is a thin driver instead of re-implementing the lifecycle and lanes. - StoreGlobalBase(IGlobalTransform, ABC): the beginGlobal skeleton (CONFIG guard, serverName, embedder wiring, super().beginGlobal), endGlobal, validateConfig. Drivers implement _open_store / _sub_key / _probe_connection. - StoreInstanceBase(VectorStoreToolMixin, IInstanceTransform, ABC): the three byte-identical lane handlers (writeQuestions/writeDocuments/renderObject). Inheriting the mixin gives every node the search/upsert/delete agent tools uniformly — today only 3 of 9 nodes expose them. - store.py -> store/document_store.py; store/__init__.py re-exports the public surface so `from ai.common.store import ...` keeps working. - Migrate store_qdrant as the pilot: IGlobal 224->153, IInstance 78->32 lines, behavior unchanged. The other 8 drivers migrate in follow-ups. * refactor(nodes): migrate 7 vector stores onto StoreBase Collapse each IInstance to StoreInstanceBase (shared lane handlers + tool mixin) and each IGlobal to StoreGlobalBase with three driver hooks: _open_store, _sub_key, _probe_connection. Per-driver specifics stay in the driver: collection-name regexes, SDK probes and _format_error helpers, and the astra/atlas subKey shapes. Data-lane-only drivers (milvus/postgres/ weaviate/astra/atlas) now expose the search/upsert/delete agent tools and a tool-path embedder uniformly, and drop their duplicated lifecycle. Pinecone no longer imports its Store at module load (config mode stays driver-free). Elasticsearch (dual-backend, no shared Store) is deferred to a dedicated PR. * fix(ai): guard missing store in shared lanes and clear transform key on teardown Address review feedback on the store base: writeQuestions/writeDocuments now raise the same explicit error as renderObject when the store is absent (restores the guard postgres/astra/atlas carried before the migration), and endGlobal calls super() so IGlobalTransform clears TRANFORM_KEY_TAG_NAME instead of leaving it set after teardown. Also refresh stale references to the pre-package store.py path in the tool-mixin test. * feat(nodes): register astra/atlas/milvus/postgres/weaviate as tool nodes These five stores inherited VectorStoreToolMixin in the base migration but their services.json never opted into tool discovery, so the search/upsert/ delete tools were unreachable. Add 'tool' to classType and 'invoke' to capabilities, and give each a serverName field (plus profile defaults) so two nodes of the same kind in one pipeline get distinct tool namespaces instead of both answering to e.g. milvus.search. READMEs gain the Agent tools section; the generated Schema block regenerates on develop. * test(ai): cover StoreGlobalBase/StoreInstanceBase lifecycle Pin the six behaviors a regression in the shared base could silently break across all eight store nodes: CONFIG mode short-circuits before the driver loads, serverName resolves from merged config (default survives blank/non- string), the tool-path embedder stays unset without an embedding block and warns instead of raising, the transform key format, endGlobal clearing state plus the transform key, and the lane guards raising on a missing store. The last two are the review-driven fixes from eecfb6d, now regression-tested. * docs(nodes,ai): hook docstrings and review nits Give the driver hooks (_open_store/_sub_key/_probe_connection) one-line docstrings matching the graph family, so the base's three-hook public surface is documented per driver. Also: drop private _normalize_vectordb_tool_input from the store package __all__ (it stays reachable via document_store), note why the base passes raw connConfig to _open_store rather than the merged cfg, and fix the atlas save-time warning to show a MongoDB SRV URI that actually matches the validation regex (credentials + trailing query).
Summary
StoreGlobalBase/StoreInstanceBaseinai.common.store. The store lifecycle (open the store, wire the control-plane embedder, register the transform key, save-time validation) and the three pipeline lane handlers (writeQuestions/writeDocuments/renderObject) now live once in the base. Each driver keeps only its own specifics through three hooks:_open_store,_sub_key,_probe_connection.IInstancecollapses to a two-line subclass; eachIGlobaldrops its duplicatedbeginGlobal/endGlobal._format_errorhelpers, and the non-standard sub-keys (astraendpoint/collection, atlashost/database/collection). The three hooks carry per-driver docstrings.search/upsert/deletetools viaVectorStoreToolMixin. qdrant/chroma/pinecone were already registered as tool nodes; astra/atlas/milvus/postgres/weaviate are now registered too — theirservices.jsongains"tool"inclassType,"invoke"incapabilities, and aserverNamefield (with profile defaults) so multiple nodes of the same kind get distinct tool namespaces. Each README gains the Agent tools section; the generated## Schemablock regenerates on develop.store.pybecame astore/package; its__init__.pyre-exports the public surface (DocumentStoreBase,VectorStoreToolMixin,getStore) sofrom ai.common.store import ...keeps working unchanged.Type
refactor (shared base extraction) + feat (tool registration for five stores) — no
.pipeschema,protocolorprefixchangesTesting
packages/ai/tests/ai/common/store/test_store_base.py— 14 tests pinning the shared lifecycle: CONFIG short-circuit,serverNameresolution, embedder wiring (None / warn-not-raise), transform-key format,endGlobalcleanup incl. the transform key, and the lanestore is Noneguards./builder testruns in CI on this PRChecklist
protocol/prefixunchanged, saved pipes keep resolvingLinked Discussion
Follows the node naming /
classTypeunification work (#1635, #1636). Pinecone's transform sub-key note is tracked separately in #1664.